import 'package:pigeon/pigeon.dart';

@HostApi()
abstract class HostHttp {
  Map<String, dynamic> sign(Map<String, dynamic> params);

  String get token;
}

@FlutterApi()
abstract class RouteC {
  String get uniqueId;
}

/*(抽象类里的类型需在此先定义，)进到home文件夹， flutter pub run pigeon --input pigeons/api_server.dart, 然后实现各端的abstract类
*/
void configurePigeon(PigeonOptions opts) {
  opts.dartOut = 'lib/network/http/api_server.dart';
  opts.objcHeaderOut = 'ios/Classes/serverapi.h';
  opts.objcSourceOut = 'ios/Classes/serverapi.m';
  // opts.objcOptions?.prefix = 'FB';
  opts.javaOut = 'android/src/main/java/lib/standard/f/ServerApi.java';
}
